/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SoStockOccu extends BasicModel<SoStockOccu> {
  cwhcode?: string; // 仓库
  cinvcode?: string; // 存货编码
  iqty?: number; // 数量
}

export const soStockOccuList = (params?: SoStockOccu | any) =>
  defHttp.get<SoStockOccu>({ url: adminPath + '/shop/order/soStockOccu/list', params });

export const soStockOccuListData = (params?: SoStockOccu | any) =>
  defHttp.post<Page<SoStockOccu>>({ url: adminPath + '/shop/order/soStockOccu/listData', params });

export const soStockOccuForm = (params?: SoStockOccu | any) =>
  defHttp.get<SoStockOccu>({ url: adminPath + '/shop/order/soStockOccu/form', params });

export const soStockOccuSave = (params?: any, data?: SoStockOccu | any) =>
  defHttp.postJson<SoStockOccu>({ url: adminPath + '/shop/order/soStockOccu/save', params, data });

export const soStockOccuDelete = (params?: SoStockOccu | any) =>
  defHttp.get<SoStockOccu>({ url: adminPath + '/shop/order/soStockOccu/delete', params });
